<template>
	<view>
		<view class="topBar">
			<!-- 自定义导航栏 -->
			<view>
				<uni-nav-bar backgroundColor="#3284fc" :border="false" color="black" @clickLeft="back" height="50px"
					left-icon="left" leftText="返回" rightText="设置" title="汽车保养" />
			</view>


			<view class="Info">
				<uni-card class="card1">
					<!-- 地图 -->
					<view class="page-body">
						<view class="page-section page-section-gap">
							<map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude"
								:markers="covers">
							</map>
						</view>
					</view>

					<!-- 汽车生活馆 -->
					<view class="carLifeHoom">
						<view class="titleInfo">
							<view style="font-size: 36rpx; font-weight: 700;">车百事汽车生活馆</view>
							<view style="color: deepskyblue;">556m</view>
						</view>

						<!-- 评分 -->
						<view class="starInfo">
							<u-rate activeColor="yellow" inactiveColor="g" :count="count" v-model="value"
								touchable></u-rate>
							<text style="margin: 0 20rpx; margin-top: 5rpx;">5分</text>
						</view>

						<!-- 详细内容 -->
						<view class="hoomInfo">
							<view style="width: 500rpx;">
								<view>
									营业时间: 周一至周五 早上8:00-晚上22:00
								</view>
								<view>
									位置: 山阳区人民路与解放路交叉口
								</view>
							</view>
							<image style="width: 120rpx; height: 100rpx;" src="../../static/myf_img/车店.jpg"></image>
						</view>

						<!-- 按钮 -->
						<view class="bottomBtn">
							<button @click="show = true" class="btn">
								<uni-icons style="vertical-align: middle;" type="phone" size="30"></uni-icons>
								联系门店
							</button>
							<u-action-sheet @close="show = false" cancelText="取消拨号" :actions="list"
								:closeOnClickOverlay="true" :closeOnClickAction="true" :show="show"></u-action-sheet>
							<button style="background-color: orangered;" class="btn">
								<uni-icons style="vertical-align: middle;" type="heart" size="30"></uni-icons>
								立即预定
							</button>
						</view>
					</view>
				</uni-card>
			</view>





		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				list: [{
						name: '165629152662',
					},
					{
						name: '复制',
					}
				],
				count: 5,
				value: 5,
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 34.813526,
				longitude: 113.560539,
				covers: [{
					latitude: 34.813526,
					longitude: 113.560539,
					iconPath: '../../../static/location.png'
				}]
			}
		},
		methods: {
			back() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style>
	.bottomBtn .btn {
		color: #fff;
		background-color: deepskyblue;
		width: 250rpx;
		height: 80rpx;
		border-radius: 50rpx;
		text-align: center;
		line-height: 80rpx;
		font-size: 30rpx;
		vertical-align: middle;
	}

	.carLifeHoom .bottomBtn {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 30rpx;
	}

	.carLifeHoom .hoomInfo {
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap;
	}

	.carLifeHoom .starInfo {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 300rpx;
		margin: 30rpx 0;
	}

	.carLifeHoom .titleInfo {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.Info .carLifeHoom {
		margin-top: 50rpx;
	}

	.Info .card1 {
		border-radius: 30rpx;
		height: 1000rpx;
	}

	.topBar {
		background-color: #3284fc;
		width: 750rpx;
		height: 400rpx;
	}
</style>